package com.qsxc.dao.mapper;

import com.qsxc.dao.entity.SmPromoter;
import com.qsxc.system.config.mybatis.MyBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 推广员信息表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2024-09-25
 */
@Mapper
public interface SmPromoterMapper extends MyBaseMapper<SmPromoter> {
    /**
     * 根据openid查询推广员信息
     *
     * @param openid
     * @return
     */
    SmPromoter queryByOpenid(@Param("openid") String openid);

    /**
     * 根据手机号查询推广员信息
     *
     * @param telephone
     * @return
     */
    SmPromoter queryByTelephone(@Param("telephone") String telephone);

    /**
     * 根据ID查询推广员信息
     *
     * @param promoterId
     * @return
     */
    SmPromoter queryById(@Param("promoterId") String promoterId);

    /**
     * 根据ID查询下级推广员信息
     *
     * @param pId
     * @return
     */
    List<SmPromoter> queryListByPId(@Param("pId") Long pId);
}
